<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BHtmlWidget</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BHtmlWidget">
			<h1>BHtmlWidget</h1>
			<p>继承自<a href="BScrollArea.html">BScrollArea</a></p>
			<p id="resume">BHtmlWidget是简单的html页面，常用于浏览和编辑超文本文档。<a href="#desc">详细</a></p><h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BHtmlWidget(BWidget*)">BHtmlWidget</a>(BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#BHtmlWidget(const BString&,BWidget*)">BHtmlWidget</a>(const BString&amp; title, BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#~BHtmlWidget()">~BHtmlWidget</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#load(const BString&)">load</a>(const BString&amp; fileName);</td></tr>
				<tr><td align="right">bool </td><td><a href="#save(const BString&) const">save</a>(const BString&amp; fileName) const;</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#fileName() const">fileName</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#read(const BStream&)">read</a>(const BStream&amp; stream);</td></tr>
				<tr><td align="right">bool </td><td><a href="#write(BStream&) const">write</a>(BStream&amp; stream) const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#read(const BString&)">read</a>(const BString&amp; text);</td></tr>
				<tr><td align="right">bool </td><td><a href="#write(BString&)">write</a>(BString&amp; text);</td></tr>
				<tr><td align="right">void </td><td><a href="#setEditable(bool)">setEditable</a>(bool editable);</td></tr>
				<tr><td align="right">bool </td><td><a href="#editable() const">editable</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setAutoTitle(bool)">setAutoTitle</a>(bool autoTitle);</td></tr>
				<tr><td align="right">bool </td><td><a href="#autoTitle() const">autoTitle</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setSelectMode(SelectMode)">setSelectMode</a>(SelectMode select);</td></tr>
				<tr><td align="right">SelectMode </td><td><a href="#selectMode() const">selectMode</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setItemSelected(BHtmlItem*,bool)">setItemSelected</a>(BHtmlItem* item, bool selected = true);</td></tr>
				<tr><td align="right">bool </td><td><a href="#clearSelection()">clearSelection</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#removeItem(BHtmlItem*)">removeItem</a>(BHtmlItem* item);</td></tr>
				<tr><td align="right">bool </td><td><a href="#clearItems()">clearItems</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#empty() const">empty</a>() const;</td></tr>
				<tr><td align="right">int </td><td><a href="#selectedItemCount() const">selectedItemCount</a>() const;</td></tr>
				<tr><td align="right">BHtmlItem* </td><td><a href="#selectedItem(int)">selectedItem</a>(int index = 0);</td></tr>
				<tr><td align="right">const BHtmlItem* </td><td><a href="#selectedItem(int) const">selectedItem</a>(int index = 0) const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setSelection(BHtmlItem*)">setSelection</a>(BHtmlItem* selectedItem);</td></tr>
				<tr><td align="right">bool </td><td><a href="#setSelection(const BHtmlItemArray&)">setSelection</a>(const BHtmlItemArray&amp; selection);</td></tr>
				<tr><td align="right">const BHtmlItemArray&amp; </td><td><a href="#selection() const">selection</a>() const;</td></tr>
				<tr><td align="right">BString </td><td><a href="#selectedText() const">selectedText</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#itemVisual(BHtmlItem*) const">itemVisual</a>(BHtmlItem* item) const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#scrollToItem(BHtmlItem*,Align)">scrollToItem</a>(BHtmlItem* item, Align align = Align_None);</td></tr>
				<tr><td align="right">bool </td><td><a href="#setHtml(BXmlNode*)">setHtml</a>(BXmlNode* html);</td></tr>
				<tr><td align="right">const BXmlNode* </td><td><a href="#html() const">html</a>() const;</td></tr>
				<tr><td align="right">BXmlNode* </td><td><a href="#html()">html</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#setHead(BXmlNode*)">setHead</a>(BXmlNode* head);</td></tr>
				<tr><td align="right">const BXmlNode* </td><td><a href="#head() const">head</a>() const;</td></tr>
				<tr><td align="right">BXmlNode* </td><td><a href="#head()">head</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#setBody(BHtmlItem*)">setBody</a>(BHtmlItem* body);</td></tr>
				<tr><td align="right">const BHtmlItem* </td><td><a href="#body() const">body</a>() const;</td></tr>
				<tr><td align="right">BHtmlItem* </td><td><a href="#body()">body</a>();</td></tr>
				<tr><td align="right">BHtmlItem* </td><td><a href="#itemAt(const BPoint&)">itemAt</a>(const BPoint&amp; point);</td></tr>
				<tr><td align="right">const BHtmlItem* </td><td><a href="#itemAt(const BPoint&) const">itemAt</a>(const BPoint&amp; point) const;</td></tr>
				<tr><td align="right">BHtmlItem* </td><td><a href="#locate(const BString&)">locate</a>(const BString&amp; desc);</td></tr>
				<tr><td align="right">const BHtmlItem* </td><td><a href="#locate(const BString&) const">locate</a>(const BString&amp; desc) const;</td></tr>
				<tr><td align="right">using </td><td><a href="#BObject::query;()">BObject::query;</a></td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#input(const BString&, const BValue&)">input</a>(const BString&amp; text, const BValue&amp; value);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#query(const BString&, BValue&) const">query</a>(const BString&amp; text, BValue&amp; value) const;</td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">virtual void </td><td><a href="#scrolling(Orientation)">scrolling</a>(Orientation orientation);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#updateEvent(const BEvent&)">updateEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#resizeEvent(const BEvent&)">resizeEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#styleEvent(const BEvent&)">styleEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#freshEvent(const BEvent&)">freshEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#paintEvent(const BEvent&)">paintEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#focusEvent(const BEvent&)">focusEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#inputEvent(const BEvent&)">inputEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#keyPressEvent(const BKeyEvent&)">keyPressEvent</a>(const BKeyEvent&amp; keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#keyReleaseEvent(const BKeyEvent&)">keyReleaseEvent</a>(const BKeyEvent&amp; keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseEnterEvent(const BMouseEvent&)">mouseEnterEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseLeaveEvent(const BMouseEvent&)">mouseLeaveEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mousePressEvent(const BMouseEvent&)">mousePressEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseReleaseEvent(const BMouseEvent&)">mouseReleaseEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseMoveEvent(const BMouseEvent&)">mouseMoveEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseClickEvent(const BMouseEvent&)">mouseClickEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseDoubleClickEvent(const BMouseEvent&)">mouseDoubleClickEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p> BHtmlWidget是简单的html页面，常用于浏览和编辑超文本文档。
					<br/> 按照Html规范，文本应该有一个&lt;html&gt;标签和一个&lt;body&gt;标签，&lt;html&gt;标签是可以没有的。&lt;body&gt;标签通常作为内容主体，且主体标签只能有一个。但主体标签名称可以不是body，有时会给定比较简单的标签进行显示，如："&lt;c&gt;123&lt;sup&gt;2" 表示 
					<c>123</c><sup>2</sup> 。 
				</p>
				<p>&lt;html&gt;标签下常常会有&lt;head&gt;标签，其功能是指定文档使用的配置和资源。作如下说明：</p><table>
					<tr><td>&lt;title&gt;</td><td>指定当前页面的标题，也就是此控件的标题。并且在每次头标签（head）改变时都会被重新应用。<br/>如果不希望控件标题被修改，需要使用方法setAutoTitle(false)以阻止改标题行为。</td></tr>
					<tr><td/><td/></tr></table><p>页面中的内容由标签项（<a>BHtmlItem</a>）组成。此页面可以编辑各个标签项，当页面的readOnly属性被改变为false时，可对各个项的文本进行编辑。</p><p>页面的内容大小根据区域策略（areaPolicy()）改变，默认情况下页面宽度会进行扩张。</p><p>此页面的按键事件处理中包含了对Ctrl+C、Ctrl+X、Ctrl+V、Ctrl+Z、Ctrl+Shift+Z的处理，所以这些快捷键组合会被过滤掉。</p>
				<h3> 信号表： 
				</h3>
				<table>
					<tr><td>Signal_ItemSelected 
						</td><td> 项目被选择时发出，数值为BHtmlItem*。 
						</td></tr>
					<tr><td>Signal_ItemClicked 
						</td><td> 项目被单击时发出，数值为BHtmlItem*。 
						</td></tr>
					<tr><td>Signal_ItemHovered 
						</td><td>当一个项目被鼠标悬停时发出此信号，数值为BHtmlItem*。 
						</td></tr>
					<tr><td>Signal_EditFinished 
						</td><td>在编辑状态下完成编辑操作时发出，无数值。 
						</td></tr>
					<tr><td>Signal_ItemRightClicked</td><td>当一个项目被鼠标右击时发出，数值为BHtmlItem*。</td></tr>
					<tr><td>Signal_ItemDoubleClicked</td><td>当一个项目被鼠标双击时发出，数值为BHtmlItem*。</td></tr>
				</table>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BHtmlWidget(BWidget*)">
				<h3>BHtmlWidget(BWidget* parent = 0);</h3>
				<p> 构造一个超文本页面，parent指定其父控件。 
				</p>
			</div>
			<div id="BHtmlWidget(const BString&,BWidget*)">
				<h3>BHtmlWidget(const BString&amp; title, BWidget* parent = 0);</h3>
				<p>构造一个超文本页面，parent指定其父控件。</p>
			</div>
			<div id="~BHtmlWidget()">
				<h3>~BHtmlWidget();</h3>
			</div>
			<div id="load(const BString&)">
				<h3>bool load(const BString&amp; fileName);</h3>
			</div>
			<div id="save(const BString&) const">
				<h3>bool save(const BString&amp; fileName) const;</h3>
				<p> 将此页面的内容保存为指定的文件。 
				</p>
				<p>参考：<a href="#write(const BString&)"> write() 
					</a></p>
			</div>
			<div id="fileName() const">
				<h3>const BString&amp; fileName() const;</h3>
			</div>
			<div id="read(const BStream&)">
				<h3>bool read(const BStream&amp; stream);</h3>
			</div>
			<div id="write(BStream&) const">
				<h3>bool write(BStream&amp; stream) const;</h3>
			</div>
			<div id="read(const BString&)">
				<h3>bool read(const BString&amp; text);</h3>
			</div>
			<div id="write(BString&)">
				<h3>bool write(BString&amp; text);</h3>
			</div>
			<div id="setEditable(bool)">
				<h3>void setEditable(bool editable);</h3>
			</div>
			<div id="editable() const">
				<h3>bool editable() const;</h3>
			</div>
			<div id="setAutoTitle(bool)">
				<h3>void setAutoTitle(bool autoTitle);</h3>
				<p>设置此页面是否自动更新&lt;head&gt;标签中的标题。</p>
			</div>
			<div id="autoTitle() const">
				<h3>bool autoTitle() const;</h3>
			</div>
			<div id="setSelectMode(SelectMode)">
				<h3>void setSelectMode(SelectMode select);</h3>
			</div>
			<div id="selectMode() const">
				<h3>SelectMode selectMode() const;</h3>
			</div>
			<div id="setItemSelected(BHtmlItem*,bool)">
				<h3>bool setItemSelected(BHtmlItem* item, bool selected = true);</h3>
			</div>
			<div id="clearSelection()">
				<h3>bool clearSelection();</h3>
			</div>
			<div id="removeItem(BHtmlItem*)">
				<h3>bool removeItem(BHtmlItem* item);</h3>
				<p> Remove the item, if successed widget will refresh and if item has parent item the Signal_ItemChanged will emited with it's parent item. 
				</p>
			</div>
			<div id="clearItems()">
				<h3>bool clearItems();</h3>
			</div>
			<div id="empty() const">
				<h3>bool empty() const;</h3>
			</div>
			<div id="selectedItemCount() const">
				<h3>int selectedItemCount() const;</h3>
			</div>
			<div id="selectedItem(int)">
				<h3>BHtmlItem* selectedItem(int index = 0);</h3>
			</div>
			<div id="selectedItem(int) const">
				<h3>const BHtmlItem* selectedItem(int index = 0) const;</h3>
			</div>
			<div id="setSelection(BHtmlItem*)">
				<h3>bool setSelection(BHtmlItem* selectedItem);</h3>
			</div>
			<div id="setSelection(const BHtmlItemArray&)">
				<h3>bool setSelection(const BHtmlItemArray&amp; selection);</h3>
			</div>
			<div id="selection() const">
				<h3>const BHtmlItemArray&amp; selection() const;</h3>
			</div>
			<div id="selectedText() const">
				<h3>BString selectedText() const;</h3>
			</div>
			<div id="itemVisual(BHtmlItem*) const">
				<h3>bool itemVisual(BHtmlItem* item) const;</h3>
			</div>
			<div id="scrollToItem(BHtmlItem*,Align)">
				<h3>bool scrollToItem(BHtmlItem* item, Align align = Align_None);</h3>
			</div>
			<div id="setHtml(BXmlNode*)">
				<h3>bool setHtml(BXmlNode* html);</h3>
			</div>
			<div id="html() const">
				<h3>const BXmlNode* html() const;</h3>
			</div>
			<div id="html()">
				<h3>BXmlNode* html();</h3>
			</div>
			<div id="setHead(BXmlNode*)">
				<h3>bool setHead(BXmlNode* head);</h3>
			</div>
			<div id="head() const">
				<h3>const BXmlNode* head() const;</h3>
			</div>
			<div id="head()">
				<h3>BXmlNode* head();</h3>
			</div>
			<div id="setBody(BHtmlItem*)">
				<h3>bool setBody(BHtmlItem* body);</h3>
			</div>
			<div id="body() const">
				<h3>const BHtmlItem* body() const;</h3>
				<p> Get body item of html document. You can get the root "html" node use BXmlNode::root(). 
				</p>
			</div>
			<div id="body()">
				<h3>BHtmlItem* body();</h3>
			</div>
			<div id="itemAt(const BPoint&)">
				<h3>BHtmlItem* itemAt(const BPoint&amp; point);</h3>
				<p> Get html item at point. 
				</p>
			</div>
			<div id="itemAt(const BPoint&) const">
				<h3>const BHtmlItem* itemAt(const BPoint&amp; point) const;</h3>
			</div>
			<div id="locate(const BString&)">
				<h3>BHtmlItem* locate(const BString&amp; desc);</h3>
			</div>
			<div id="locate(const BString&) const">
				<h3>const BHtmlItem* locate(const BString&amp; desc) const;</h3>
			</div>
			<div id="BObject::query;()">
				<h3>using BObject::query;</h3>
			</div>
			<div id="input(const BString&, const BValue&)">
				<h3>virtual bool input(const BString&amp; text, const BValue&amp; value);</h3>
			</div>
			<div id="query(const BString&, BValue&) const">
				<h3>virtual bool query(const BString&amp; text, BValue&amp; value) const;</h3>
			</div>
			<div id="scrolling(Orientation)">
				<h3>virtual void scrolling(Orientation orientation);</h3>
			</div>
			<div id="updateEvent(const BEvent&)">
				<h3>virtual void updateEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="resizeEvent(const BEvent&)">
				<h3>virtual void resizeEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="styleEvent(const BEvent&)">
				<h3>virtual void styleEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="freshEvent(const BEvent&)">
				<h3>virtual void freshEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="paintEvent(const BEvent&)">
				<h3>virtual void paintEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="focusEvent(const BEvent&)">
				<h3>virtual void focusEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="inputEvent(const BEvent&)">
				<h3>virtual void inputEvent(const BEvent&amp; event);</h3>
			</div>
			<div id="keyPressEvent(const BKeyEvent&)">
				<h3>virtual void keyPressEvent(const BKeyEvent&amp; keyEvent);</h3>
			</div>
			<div id="keyReleaseEvent(const BKeyEvent&)">
				<h3>virtual void keyReleaseEvent(const BKeyEvent&amp; keyEvent);</h3>
			</div>
			<div id="mouseEnterEvent(const BMouseEvent&)">
				<h3>virtual void mouseEnterEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseLeaveEvent(const BMouseEvent&)">
				<h3>virtual void mouseLeaveEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mousePressEvent(const BMouseEvent&)">
				<h3>virtual void mousePressEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseReleaseEvent(const BMouseEvent&)">
				<h3>virtual void mouseReleaseEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseMoveEvent(const BMouseEvent&)">
				<h3>virtual void mouseMoveEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseClickEvent(const BMouseEvent&)">
				<h3>virtual void mouseClickEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseDoubleClickEvent(const BMouseEvent&)">
				<h3>virtual void mouseDoubleClickEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
		</div>
	</body>
</html>